package com.结构型模式.代理模式.静态代理;

/**代理类
 * @author chenhs
 * @date 2020/10/13
 */
public class Agency implements  ISubject {
	private  SubjectImpl subject;
	public Agency(){
		if( subject == null){
			this.subject=new SubjectImpl();
		}
	}
	@Override
	public void speak() {
		front();
		subject.speak();
		queen();
	}
	private  void front(){
		System.out.println("前置真强A");
	}
	private  void queen(){
		System.out.println("后置真强A");
	}
	
}
